import https from '../utils/index.js';

//博客文章
export const index=()=>{
    return https.get('/index');
}

//根据分类获取主页数据
export const findByCate=(params)=>{
    return https.get('/findByCate',{params});
}

//更新阅读量
export const addCount=(data)=>{
    return https.post('/addCount',data);
}

// 热门文章
export const hotArticles=()=>{
    return https.get('/hotArticle');
}


/**
 * 
前端代码
export const addCount=(data)=>{
    return https.post('/addCount',data);
}
后端代码:
@PostMapping("/addCount")
    public Result addCount(Integer id){
        articleService.addCount(id);
        return Result.success();
    }
 */